package com.weme.matching.viewmode

import com.weme.common.base.BaseViewModel
import com.weme.common.network.NetWorkUrl
import dev.kratos.api.im_server.v1.GetMatchBannerRequest
import dev.kratos.api.im_server.v1.MatchCancelRequest
import dev.kratos.api.im_server.v1.MatchRequest

class MatchingViewMode : BaseViewModel() {


    fun getMatchBanner(page:Int) {
        sendImNetworkRequest(GetMatchBannerRequest.newBuilder().setPage(page).setPageSize(20).build().toByteArray(), NetWorkUrl.GetMatchBanner)
    }
    fun getMatch() {
        sendImNetworkRequest(MatchRequest.newBuilder().build().toByteArray(), NetWorkUrl.MatchRequest)
    }

    fun getMatchint() {
        sendImNetworkRequest(MatchRequest.newBuilder().build().toByteArray(), NetWorkUrl.MatchRequestIng)
    }
    fun setMatchCancel(matchId :String) {
        sendImNetworkRequest(MatchCancelRequest.newBuilder().setMatchId(matchId).build().toByteArray(), NetWorkUrl.MatchCancelRequest)
    }
}